import 'package:flutter/material.dart';
import 'package:meal/constant/sizes.dart';
import 'package:meal/utils/colors.dart';
import 'package:meal/utils/styles.dart';
import 'package:meal/utils/tools.dart';

///
/// 账户信息
///
class AccountInfo extends StatefulWidget {
  const AccountInfo({Key? key}) : super(key: key);

  @override
  State<AccountInfo> createState() => _AccountInfoState();
}

class _AccountInfoState extends State<AccountInfo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ToolsUtils.getDefaultBackgroundColor(),
      appBar: ToolsUtils.getDefaultBrnAppBar('账户信息'),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Container(
              height: Sizes.default50,
              alignment: Alignment.centerLeft,
              padding: const EdgeInsets.symmetric(horizontal: Sizes.default15),
              child: Text('结算信息',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color797, fontSize: Sizes.default13)),
            ),
            Container(
              padding: const EdgeInsets.all(Sizes.default15),
              decoration: const BoxDecoration(
                color: Colors.white,
              ),
              child: ListBody(
                children: [
                  Container(
                      alignment: Alignment.centerLeft,
                      margin: const EdgeInsets.only(bottom: Sizes.default10),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Text(
                            '结算方式',
                            style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                          ),
                          Text('T+1',
                              style: StylesUtils.customTextStyle(color: ColorsUtils.color797))
                        ],
                      )),
                  Align(
                    alignment: Alignment.centerLeft,
                    child: Text(
                      '订单款项默认按结算周期入账',
                      style: StylesUtils.customTextStyle(
                          fontSize: Sizes.default12, color: ColorsUtils.color999),
                    ),
                  )
                ],
              ),
            ),
            Container(
              height: Sizes.default50,
              alignment: Alignment.centerLeft,
              padding: const EdgeInsets.symmetric(horizontal: Sizes.default15),
              child: Text('服务费信息',
                  style: StylesUtils.customTextStyle(
                      color: ColorsUtils.color797, fontSize: Sizes.default13)),
            ),
            Container(
              padding: const EdgeInsets.all(Sizes.default15),
              decoration: const BoxDecoration(
                color: Colors.white,
              ),
              child: ListBody(
                children: [
                  Container(
                      alignment: Alignment.centerLeft,
                      margin: const EdgeInsets.only(bottom: Sizes.default15),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Text(
                            '技术服务费比率',
                            style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                          ),
                          Text('5.8%',
                              style: StylesUtils.customTextStyle(color: ColorsUtils.color797))
                        ],
                      )),
                  Align(
                    alignment: Alignment.centerLeft,
                    child: Text(
                      '该比例为商户外卖对账单中平台抽成的比例',
                      style: StylesUtils.customTextStyle(
                          fontSize: Sizes.default12, color: ColorsUtils.color999),
                    ),
                  ),
                  Container(
                      alignment: Alignment.centerLeft,
                      margin: const EdgeInsets.only(top: Sizes.default15),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Text(
                            '最低技术服务费',
                            style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                          ),
                          Text('￥10',
                              style: StylesUtils.customTextStyle(color: ColorsUtils.color797))
                        ],
                      )),
                  Container(
                      alignment: Alignment.centerLeft,
                      margin: const EdgeInsets.only(top: Sizes.default15),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Text(
                            '技术服务费优惠',
                            style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                          ),
                          Text('10￥/单',
                              style: StylesUtils.customTextStyle(color: ColorsUtils.color797))
                        ],
                      )),
                  Container(
                      alignment: Alignment.centerLeft,
                      margin: const EdgeInsets.only(top: Sizes.default15),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Text(
                            '优惠状态',
                            style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                          ),
                          Text('生效中',
                              style: StylesUtils.customTextStyle(color: ColorsUtils.color797))
                        ],
                      )),
                  Container(
                      alignment: Alignment.centerLeft,
                      margin: const EdgeInsets.only(top: Sizes.default15),
                      child: Row(
                        mainAxisAlignment: MainAxisAlignment.spaceBetween,
                        children: [
                          Text(
                            '优惠期限',
                            style: StylesUtils.customTextStyle(color: ColorsUtils.color333),
                          ),
                          Text('2021-10-17 至 2024-11-17',
                              style: StylesUtils.customTextStyle(color: ColorsUtils.color797))
                        ],
                      )),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
